package com.bittech.base;

/**
 * @Author: yuisama
 * @Date: 2019-07-15 13:38
 * @Description:异常体系问题
 */
public class ExceptionTest {
    // 以下代码的输出
    public static void main(String[] args) {
        System.out.println(test1());
        System.out.println(test2());
    }

    public static int test1() {
        int i = 0;
        try {
            i = 1;
            return i;
        }catch (Exception e) {
            i = 2;
            return i;
        }
        finally {
            i = 3;
            return i;
        }
    }

    public static int test2() {
        int i = 0;
        try {
            i = 1;
            return i;
        }catch (Exception e) {
            i = 2;
            return i;
        }
        finally {
            i = 3;
        }
    }
}
